<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/15/015
 * Time: 16:17
 */

namespace app\api\controller\v1;


use cmf\controller\HomeBaseController;
use app\api\model\PortalPostModel as Poral;

/**
 * Class ArticleController 文章控制器
 * @package app\api\controller\v1
 */
class ArticleController extends HomeBaseController
{
    /**
     * 获取更多文章
     * @return  list
     */
    public function index( $num )
    {
        $list = Poral::getMostArticle($num);
        return $list;
    }

    /**
     * 获取文章详情
     * @return  detail
     */
    public function getOne( $id )
    {
        $article = Poral::getArticleDetail($id);
        return $article;
    }
}